gtkprintjob: release the surface and backend before the output io channel
authorCarlos Garcia Campos <cgarcia@igalia.com>
Wed, 3 Oct 2012 17:24:52 +0000 (19:24 +0200)
committerCarlos Garcia Campos <carlosgc@gnome.org>
Sun, 14 Apr 2013 10:19:09 +0000 (12:19 +0200)
commitc737e1d194b9fadfbbcfe6a6ce7bc38c16055ef9
tree97378eb441da809175bd43eefe22d6ee16504b74
parent2adacca119aad1c8f62b02028762dc454aee4474
gtkprintjob: release the surface and backend before the output io channel

If the GtkPrintJob is freed too early when the surface has been created
but the job hasn't been sent to the printer, it's possible that the
file print backend tries to write to the io chaneel when it is already
closed. This produces runtime critical warnings:

GLib-CRITICAL **: g_io_channel_write_chars: assertion `channel->is_writeable' failed

https://bugzilla.gnome.org/show_bug.cgi?id=685420
gtk/gtkprintjob.c